When an image of an image pickup object is picked up, while a portion of the image pickup object is illuminated, another portion of the image pickup object is in a shadow. In such a case, a picked up image sometimes exhibits an excessively great difference between the luminance of the illuminated portion and the luminance of the shadowed portion of the image pickup object, resulting in difficulty in discrimination of one of the portions. Therefore, a technology has been proposed which may improve the contrast of an image pickup object by compressing the dynamic range in accordance with the Retinex theory.
The Retinex theory is based on the assumption that the visual system of the human being perceives objects based on a distribution in reflectance of an object surface with the illuminance distribution of illumination light removed from the distribution of reflected light from the object rather than based on the distribution of the reflected light. Therefore, according to the Retinex theory, where the luminance value of a pixel (x,y) of an original image is represented by I(x,y), the reflectance of an image pickup object reflected on the pixel (x,y) of the original image is represented by R(x,y) and the illuminance of illumination light at the pixel (x,y) is represented by L(x,y), it is assumed that the following expression is satisfied:I(x,y)=R(x,y)L(x,y).
Here, as a distribution L of the illuminance of illumination light, for example, a smoothened image is used which is obtained by applying a low pass filter such as a Gaussian filter to the original image. Then, an arithmetic operation of, for example, R(x,y)=I(x,y)/L(x,y) is performed to determine the reflectance R(x,y) of each pixel, and the reflectance R(x,y) of each pixel is multiplied by a constant k (where k>1) to obtain a corrected image.
However, an original image sometimes includes a background region having a very low luminance value. Since, in such a background region as just described, the ratio of noise components to a signal component is relatively high, the background region sometimes includes some spatial fluctuation in luminance value caused by the noise components. Therefore, if such a process for contrast improvement as descried above is applied to an original image, the luminance of each pixel in the background region becomes relatively high and the spatial fluctuation in luminance value caused by noise in the background region is sometimes emphasized. On the other hand, another technology has been proposed by which, in order to reduce noise included in an image, a difference value between a plurality of smoothened images and an input image is determined and compared with a threshold value to perform selection of smoothened pixels or input pixels or comparison of pixels of lower smoothness is performed (for example, refer to the patent document mentioned below).
Examples of the related art include Japanese Laid-open Patent Publication No. 2005-51379, and a non-patent document (D. J. Jobson et al., “Properties and Performance of a Center/Surround Retinex,” IEEE Trans. On Image Processing, Vol. 6, No. 3, March, 1997).